﻿@model ShiXuLong.Model.RecPositionModel
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Edit</title>
    <link href="~/scripts/css/layui.css" rel="stylesheet" />
    <script src="~/scripts/jquery-3.5.1.js"></script>
    <script src="~/scripts/layui.js"></script>
</head>
<body>
    <div>
        <div>
            @using (Ajax.BeginForm("Edit", "Home", new AjaxOptions { OnSuccess = "EditComp" }))
            {
                @Html.HiddenFor(m => m.Id)

                @*<div class="layui-form-item">
                    @Html.LabelFor(m => m.ShopId)
                    @Html.TextBoxFor(m => m.ShopId)
                    @Html.ValidationMessageFor(m => m.ShopId)
                </div>*@
                <div class="layui-form-item">
                    @Html.LabelFor(m => m.Site)
                    @Html.TextBoxFor(m => m.Site)
                    @Html.ValidationMessageFor(m => m.Site)
                </div>
                @*<div class="layui-form-item">
                    @Html.LabelFor(m => m.ShopName)
                    @Html.TextBoxFor(m => m.ShopName)
                    @Html.ValidationMessageFor(m => m.ShopName)
                </div>
                <div class="layui-form-item">
                    @Html.LabelFor(m => m.ProductProfile)
                    @Html.TextBoxFor(m => m.ProductProfile)
                    @Html.ValidationMessageFor(m => m.ProductProfile)
                </div>
                <div class="layui-form-item">
                    @Html.LabelFor(m => m.ShopTypeId)
                    @Html.TextBoxFor(m => m.ShopTypeId)
                    @Html.ValidationMessageFor(m => m.ShopTypeId)
                </div>
                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.RecommendId)
                        @Html.TextBoxFor(m => m.RecommendId)
                        @Html.ValidationMessageFor(m => m.RecommendId)
                    </div>

                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.Display)
                        @Html.TextBoxFor(m => m.Display)
                        @Html.ValidationMessageFor(m => m.Display)
                    </div>
                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.Shopimage)
                        @Html.TextBoxFor(m => m.Shopimage)
                        @Html.ValidationMessageFor(m => m.Shopimage)
                    </div>



                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.Price)
                        @Html.TextBoxFor(m => m.Price)
                        @Html.ValidationMessageFor(m => m.Price)
                    </div>
                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.Number)
                        @Html.TextBoxFor(m => m.Number)
                        @Html.ValidationMessageFor(m => m.Number)
                    </div>
                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.GuideId)
                        @Html.TextBoxFor(m => m.GuideId)
                        @Html.ValidationMessageFor(m => m.GuideId)
                    </div>
                    <div class="layui-form-item">
                        @Html.LabelFor(m => m.Status)
                        @Html.TextBoxFor(m => m.Status)
                        @Html.ValidationMessageFor(m => m.Status)
                    </div>*@
                    <div>
                        <button>提交</button>
                    </div>
            }
            <script>
                function EditComp(re) {
                    if (re.success) {
                        parent.layer.msg(re.msg);
                        parent.layui.$("#btnAdd").click();
                        //当你在iframe页面关闭自身时
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭
                    } else {
                        alert(re.msg)
                    }
                }
            </script>
        </div>
    </div>
</body>
</html>
